<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目合作信息</title>
<link rel="stylesheet" type="text/css" href="/css/front/conn.css"/>
<link rel="stylesheet" type="text/css" href="/css/front/list-step1.css"/>
<link href="/css/validate.css" rel="stylesheet" type="text/css" />
<link href="/css/area-form.css" rel="stylesheet" type="text/css" />
<script src="/js/plugs/jquery.js"></script>
<script src="/js/admins/base.js"></script>
<script src="/js/plugs/validate.js"></script>
<script src="/js/plugs/jquery.selarea.js" type="text/javascript"></script>
<style type="text/css">
	li input{
		float: left;
	}
</style>
</head>

<body>
<!-- 头部导航开始 -->
{# include file="$tpl_root_path/front/public/_header.html" #}
<!-- 头部导航结束 -->


<!-- 合作begin -->
<div class="cor" style="margin-top:100px;">
    <h6>项目合作信息</h6>
    <div class="process">
        <img src="/images/logo/pro1.png" alt="" />
    </div>
    <form class="step1" method="post"  action="" >
    <ul style="width: 800px;">
        <li>
            <div class="form-title"><i>*</i><span>工程名称：</span></div>
            <div class="form-content">
            <input type="text" name="projectName" defaultshow="2-30个字"   checkItem="isBlank:'T|请填写工程名称',computeChar:'>2<30|工程名称不足2个字,工程名称不能超过30个字',isSimple:'T|工程名称太过简单'"  />
            </div>
        </li>
        <li>
            <div class="form-title"><i>*</i><span>工程性质：</span></div>
            <select name="nature">
                <!--<option value="0"  selected="selected">请选择</option>-->
                <option value ="1" {#if $data.POSITION==1 #}selected = "selected"{#/if#}>写字楼</option>
                <option value ="2" {#if $data.POSITION==2 #}selected = "selected"{#/if#}>地铁</option>
                <option value ="3" {#if $data.POSITION==3 #}selected = "selected"{#/if#}>高铁</option>
                <option value ="4" {#if $data.POSITION==4 #}selected = "selected"{#/if#}>机场</option>
                <option value ="5" {#if $data.POSITION==5 #}selected = "selected"{#/if#}>商场</option>
                <option value ="6" {#if $data.POSITION==6 #}selected = "selected"{#/if#}>公共建筑</option>
                <option value ="7" {#if $data.POSITION==7 #}selected = "selected"{#/if#}>学校</option>
                <option value ="8" {#if $data.POSITION==8 #}selected = "selected"{#/if#}>综合体</option>
            </select>
        </li>

        <li class="three">
            <div class="form-title"><i>*</i><span>建筑面积：</span></div>
            <div class="form-content">
                <input type="text"  id="area" name="area"   defaultshow='请输入建筑面积'  maxlength="10" checkItem="checkPositiveNumber:'F|请输入建筑面积，必须为正整数'"/><span  style="line-height: 32px;margin-left: 5px;margin-right: 25px;float: left;">㎡</span>
            </div>
        </li>

 
        <li class="clearfix" name="public" id="areatop" >
            <div class="form-title"><i>*</i><span>工程地址：</span></div>
            <div class="fo_con_cont">
                <div class="area_fo_list province_list" id="area_province" data-val="" ><div class="province" >{#if empty($province)#}全国/省区/直辖市{#else#}{#$province#}{#/if#}{#$province#}</div>
                    <div class="province_list_down province_data" style="z-index:200;">
                    </div>
                </div>

                <div class="area_fo_list province_list two_city" id="area_city"><div class="city">全部/市</div>
                    <div class="province_list_down city_data" style="z-index:200;" >

                    </div>
                </div>

                <div class="area_fo_list province_list  three_area" id="area_district"><div class="area">全部/县/区</div>
                    <div class="province_list_down area_data" style="z-index:200;">

                    </div>
                </div>
                <input type="hidden" id="hidden_countrycode" name="hidden_countrycode" value=""/>
                <input type="hidden" id="hidden_countryname" name="hidden_countryname" value=""/>
                <span class="form_tips"  style="color: red;display: none;">请选择地区！</span>
                <span class="vtips Validform_wrong"  style="color: red;"></span>
            </div>
        </li>














        <li>
            <div class="form-title"><i>*</i><span>详细地址：</span></div>
            <div class="form-content">
            <input   type="text" name="address" placeholder="详细地址" defaultshow="2-60个字" maxlength="120" checkItem="isBlank:'T| 请输入详细地址',computeChar:'>2<60|字数必须在2-60之内'" />
            </div>
        </li>

        <li>
            <div class="form-title"><i>*</i><span>建设单位名称：</span></div>
            <div class="form-content">
            <input type="text"  name="constructionName" defaultshow="2-30个字"   checkItem="isBlank:'T|请填写建设单位名称',computeChar:'>2<30|建设单位名称不足2个字,建设单位名称不能超过30个字',isSimple:'T|建设单位名称太过简单'"/>
            </div>
        </li>


    </ul>

    <button class="btn"  type="submit" name="step1"  value="1" onclick="return checkStep1()">下一步</button>

    </form>
</div>
<!-- 合作over -->









<!-- 咨询栏begin -->
{# include file="$tpl_root_path/front/public/_contact.html" #}

<!-- 咨询栏over -->



<!-- 底部begin -->
{# include file="$tpl_root_path/front/public/_footer.html" #}
<!-- 底部over -->



</body>
</html>




<script  type="text/javascript">



    //地理位置初始化及即时验证
	
    $.SELAREA({
        provinceId:"area_province",
        cityId:"area_city",
        districtId:"area_district",
        areacode:"{#$data.COUNTRYCODE#}",
        provinceFirst: '省区/直辖市',   //省级选择框默认显示文字
        cityFirst : '市',             //市级选择框默认显示文字
        districtFirst : '县/区',       //县区级选择框默认显示文字
        includeCountry: false,              //省级选择框是否包含全国选项
        rmCityNo1 : true,                //是否生成市级选择框第一项
    });

    $('#area_province').mouseleave(function(){
        $('.province_data').css('display','none');
    })

    $('#area_city').mouseleave(function(){
        $('.city_data').css('display','none');
    })


    $('#area_district').mouseleave(function(){
        $('.area_data').css('display','none');
    })


    $('#area_province').parent().bind('areaChange',function(){
        var pro=$('#area_province');
        var city=$('#area_city');
        var dis=$('#area_district');


        //绑定代码
        var areaid=dis.data('val')? dis.data('val'):(city.data('val')?city.data('val'):pro.data('val'));
        $('#hidden_countrycode').val(areaid);

        //绑定地区名称
        var address='';
        if (pro.data('val')!=="")
        {
            address = pro.find('div:first').html();
        }
        if (city.data('val')!==""&&city.find('div:last').find('a').size()>2)
        {
            address += city.find('div:first').html();
        }
        if (dis.data('val')!=="")
        {
            address += dis.find('div:first').html();
        }
        $('#hidden_countryname').val(address);

        if(areaid.toString().length == 12)
            $('#area_province').parent().find('.form_tips').removeClass('form_tips form_error_tips form-no').addClass(' form_success_tips form-ok').html('').css('display','inline-block');
        else{
            var exArr=[107101,107101101,108101,108101101,109101,109101101];
            var n=$.inArray(parseInt(areaid),exArr);
            if(n!==-1){
                $('#area_province').parent().find('form_tips').removeClass('form_tips form_error_tips form-no').addClass(' form_success_tips form-ok').html('').css('display','inline-block');
            }else{
                $('#area_province').parent().find('span').removeClass('form_tips form_success_tips form-ok').addClass('form_tips form-no').html('请选择地理位置').css('display','inline-block');
            }
        }

        $("#area_district").siblings(".vtips").hide()
    });







    function checkStep1(){

        if(!validate())
            return false;

        //验证地址
        var areaid = $("#hidden_countrycode").val();
        if(areaid.length < 12){
            var exArr=[107101,107101101,108101,108101101,109101,109101101];
            var n=$.inArray(parseInt(areaid),exArr);
            if(n===-1) {
                $("#area_district").siblings(".vtips").html('请选择地区').addClass("form-no").css('display', 'inline-block').css('color','red').siblings('.form_tips').hide();
                $(window).scrollTop($("#area").parents("li").position().top);
                return false;
            }
        }


    }








</script>